I2C      SDA:P0.26  SCL:P0.27   mpu6050, hmc5882

DBG_UART_INTERFACE  := 0x10 # stdout, stdin (BLE UART) nrf52840dk UART
ERR_UART_INTERFACE  := 0x10 # stderr        (BLE UART) nrf52840dk UART
DBG_TEE_INTERFACE   := 0    # stdout copy   (UART0)
ERR_TEE_INTERFACE   := 0    # stderr copy   (UART0)

make SD=1 BOARD=nrf52840dk_nrf52840 APP=examples/i2c/hmc5883_compass flash_sd prog

# nrf52840dk starting...

# nano RTOS (C) 2022-2026 nanortos.com
hmc5883 compass

uart[0] ready
i2c[0] ready

# compass: no calibration data found, using default
dec    +588
inc   +5975
x_min  -287
y_min  -367
z_min  -577
x_max  +308
y_max  +221
z_max  +431
xv_min -500
yv_min -577
xv_max +520
yv_max +431

uart_input started
hmc5883 configured

mpu6050 configured
  Sleep Mode:        Disabled
  Clock Source:      PLL with X axis gyroscope reference
  Gyroscope:         1000 dps, x 29.070  y 78.883  z 45.770
  Accelerometer:     4G, gravity 9.843
  MPU6050_CONFIG     6


inclination={"x":1.714286,"y":1.714286,"a":1.714286}

compass_c={"h": 360.0,"x": -0.454,"y":  2.587,"z":  8.996,"x_raw": -123,"y_raw": -174,"z_raw": -334,"x_min": -287,"y_min": -367,"z_min": -577,"x_max":  308,"y_max":  221,"z_max":  431,"xv_min": -500,"yv_min": -577,"xv_max":  520,"yv_max":  431,"zero":999,"z_ang":   0,"e":"00"}
compass_i={"dec":  588,"inc": 5975}

compass={"h":  5.9,"x":-0.454,"y": 2.587,"z": 8.996}
compass={"h":  5.9,"x":-0.452,"y": 2.635,"z": 9.566}
compass={"h":  5.9,"x":-0.452,"y": 2.634,"z": 9.634}
compass={"h":  5.9,"x":-0.450,"y": 2.633,"z": 9.631}
compass={"h":114.5,"x":-0.453,"y": 2.629,"z": 9.625}
compass={"h":114.5,"x":-0.452,"y": 2.630,"z": 9.623}
compass={"h":114.5,"x":-0.452,"y": 2.630,"z": 9.619}
compass={"h":114.5,"x":-0.454,"y": 2.633,"z": 9.616}
compass={"h":114.5,"x":-0.455,"y": 2.633,"z": 9.620}
compass={"h":114.5,"x":-0.460,"y": 2.632,"z": 9.626}
